1. Field of the Invention
The present invention relates to a random number generator. More particularly, the present invention relates to a random number generator which can generate a random number based on an uniform distribution.
2. Description of the Related Art
A random number generated by a mathematic program has the possibility of occurrence of cyclic property or reproduction property. For this reason, a random number generator is desired for generating a random number by using a physical phenomenon.
In a natural random number generation card disclosed in Japanese Laid Open Patent Application (JP-A-Heisei 11-184676), alpha rays randomly radiated from an atomic nucleus are detected by using a PIN diode, and random pulses are generated, and those pulses are used to generate a true random number. A new method of generating one physical random number from one decay phenomenon uses an extremely slight dose, and generates a physical random number having a necessary number of digits at a necessary speed. A trouble is detected by comparing the number of measured pulses with the number of firstly set standard pulses, and the usage limit is also set.
Such a natural random number generation card is used to use the random phenomenon, such as the decay of the atomic nucleus, and then generate a physical random number on which an artificial operation or a decoding operation can not be performed, and thereby authenticate a person or encrypt a data. Security can be improved by a self-detection of an illegal usage or a set of a usage limit on a card.
A known random number generator 101 shown in FIG. 1 is provided with a random pulse generator 102, a clock generator 103, a time measuring unit 104 and a random number holder 105. The time measuring unit 104 has a counter 107. The random pulse generator 102 is connected to the counter 107 of the time measuring unit 104. The clock generator 103 is connected to the counter 107 of the time measuring unit 104. The counter 107 is connected to the random number retainer 105.
The random pulse generator 102 outputs a random pulse 111 that is a pulse having no cyclic property. The random pulse generator 102 has a resistor, an amplifier and a comparator which are not shown. The resistor outputs a voltage v that is varied by a thermal motion of electrons, in accordance with a temperature. The amplifier amplifies this voltage v, and outputs to the comparator. The comparator receives the amplified voltage v and a threshold V of a certain value. It outputs High if the voltage v is equal to or greater than the threshold V, and outputs Low if the voltage v is less than the threshold V.
If the threshold V is sufficiently high, the probability that the voltage v is equal to or greater than the threshold V becomes low, and an output of the comparator presents a shape of pulse. This pulse is outputted as the random pulse 111 by the random pulse generator 102. In the random pulse 111 generated by such thermal noise, a temporal interval τ_between two pulses adjacent to each other is not based on a uniform distribution, and it is based on an exponential distribution.
The clock generator 103 outputs a clock signal 112 that is a pulse having a cycle. The counter 107 receives a random pulse 111 and the clock signal 112, and outputs a random number code 113. The counter 107, if receiving one pulse of the random pulse 111, starts counting a count number c, which is the number of the pulses of the clock signal 112, from 0 in a binary notation. The counter 107, if receiving a next pulse of the random pulse 111, stops the counting, and then outputs the lower 8 digits of the counted count number c as the random number code 113.
The random number code 113 coincides with a remainder when the number of the pulses of the clock signal 112 outputted at the temporal interval τ between the two pulses adjacent to each other in the random pulse 111 is divided by 256. That is, if the count numbers c are congruent with 256 as a modulus, the random number code 113 corresponding to them coincide with each other.
The random number holder 105 sequentially records the random number codes 113 generated by the time measuring unit 104, and suitably outputs the oldest code of the recorded random number codes 113, to an apparatus in which a random number generator 101 is installed.
FIG. 2 shows a frequency distribution of the thus-generated random number code 113. This frequency distribution indicates that the larger the random number code 113, the smaller the frequency, and the random number code 113 is not based on the uniform distribution. Moreover, this frequency distribution indicates that a variation (standard deviation) of frequencies of the random number code 113 is large. FIG. 3 shows an FFT result of the random number code 113. This FFT result indicates an absence of spectrum. The absence of the spectrum indicates that the random number code 113 has no cyclic property. It is desired to provide a random number generator for generating a random number based on the physical phenomenon, in which the random number is based on the uniform distribution.